package cn.com.chengmandian.service.erp.form;/**
 * Description: cmd-erp-center
 * <p>
 * Created by asus on 2022/3/10 13:21
 */

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * 类备注:
 *{
 *     "dataId":1,
 *     "ddUserId":"182029240924815605",
 *     "userId":"1",
 *     "processCode":"PROC-55E58058-D47E-47BF-B4C6-BFAD4C5CE699",
 *     "oaProcessDataFormList":[{
 *         "controlType":"TextField",
 *         "title":"合同标题",
 *         "value":"共享电单车联营服务协议"
 *     },{
 *         "controlType":"TextField",
 *         "title":"客户名称",
 *         "value":"武汉小象创意科技有限公司"
 *     },{
 *         "controlType":"DDAttachment",
 *         "title":"合同文件",
 *         "fileUrl":"C:\\Users\\asus\\Desktop\\共享电单车运营(联营)服务协议.docx",
 *         "urlType":"local"
 *     }],
 *     "oaInstanceDataForm":{
 *         "businessType":1,
 *         "businessId":1,
 *         "title":"合同审核",
 *         "message":"请尽快审批",
 *         "createUser":"1",
 *         "createName":"管理员"
 *     }
 * }
 * Created by asus on 2021/3/8 16:13
 * QQ 2218574608 tel 13628610467
 */
@ApiModel("钉钉OA审批表单数据信息")
@Data
@NoArgsConstructor
@Accessors(chain=true)
public class OaProcessForm implements Serializable {

    @ApiModelProperty("钉钉用户id")
    private String ddUserId;

    @ApiModelProperty("流程唯一编码")
    private String processCode;

    @ApiModelProperty("钉钉表单数据")
    private List<OaProcessDataForm> oaProcessDataFormList;

    @ApiModelProperty("审批实例")
    private OaInstanceDataForm oaInstanceDataForm;

    @Data
    public static class OaProcessDataForm implements Serializable{
        @ApiModelProperty("控件类型")
        private String controlType;

        @ApiModelProperty("控件标题")
        private String title;

        @ApiModelProperty("控件值(非文件类型)")
        private String value;

        @ApiModelProperty("文件地址")
        private String fileUrl;

        @ApiModelProperty("文件获取类型")
        private String urlType;

        @ApiModelProperty("控件扩展值")
        private String extValue;
    }

    @Data
    public static class OaInstanceDataForm implements Serializable{

        @ApiModelProperty("业务类型1-合同审批")
        private Integer businessType;

        @ApiModelProperty("业务ID")
        private Integer businessId;

        @ApiModelProperty("审批标题")
        private String title;

        @ApiModelProperty("状态说明")
        private String message;

        @ApiModelProperty("发起人ID")
        private Integer createUser;

        @ApiModelProperty("发起人姓名")
        private String createName;

    }

}
